home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1127 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  770 b 

  1. Path: hubcap.clemson.edu!hubcap!mjs
  2. From: mjs@hubcap.clemson.edu (M. J. Saltzman)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Bit Masking
  5. Date: 11 Jan 96 16:05:49 GMT
  6. Organization: Clemson University
  7. Message-ID: <mjs.821376349@hubcap>
  8. References: <DKz5y4.8En@twisto.eng.hou.compaq.com> <ALUN.CHAMPION.96Jan10171101@g7240065.bridge.bst.bls.com>
  9. NNTP-Posting-Host: hubcap.clemson.edu
  10.  
  11. Alun.Champion@bridge.bst.bls.com (Alun Champion) writes:
  12.  
  13. >In article <DKz5y4.8En@twisto.eng.hou.compaq.com> garyc%cs%contractors@bangate.compaq.com (Gary Clarke) writes:
  14.  
  15. >:   Set the bit:    x |= BIT_x
  16.  
  17. >:   Clear the bit using BIT_x:    ????
  18.  
  19. >Clear the bit:    x &= ~BIT_?;
  20.  
  21. Obfuscated version: x = (x | BIT_x) ^ BIT_x;
  22. -- 
  23.         Matthew Saltzman
  24.         Clemson University Math Sciences
  25.         mjs@clemson.edu
  26.